-- GENERATED SPELL FOR [Sapphire Hive Queen] --


function spell0_28087(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(48193,pUnit)
pUnit:RegisterEvent('Sorts_28087', 10334, 1)
end

function spell1_28087(pUnit, Event) --@Poison Stinger,n/a--
pUnit:FullCastSpellOnTarget(54761,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28087', 12000, 1)
end

function Sorts_28087(pUnit, Event)
local choix_sorts_28087 = math.random(0, 1)
if choix_sorts_28087 == 0 then
pUnit:RegisterEvent('spell0_28087', 1, 1)
end
if choix_sorts_28087 == 1 then
pUnit:RegisterEvent('spell1_28087', 1, 1)
end
end

function mob28087_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28087', math.random(1500, 3000), 1)
end

function mob28087_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28087_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28087_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28087, 1, 'mob28087_Action')
RegisterUnitEvent(28087, 2, 'mob28087_Leave')
RegisterUnitEvent(28087, 3, 'mob28087_Kill')
RegisterUnitEvent(28087, 4, 'mob28087_Die')
